package com.ly.main;

import com.ly.computer.Computer;
import com.ly.computer.impl.AocDisplay;
import com.ly.computer.impl.NvidiaGraphicsCard;

public class TestMain {
    public static void main(String[] args) {
        Computer computer = new Computer(new AocDisplay(100, 4), new NvidiaGraphicsCard());
        // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
        // 必须实现 toString方法才可以输出子类的field详细信息。！！！！
        // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
        System.out.println(computer.getDisplay());
        System.out.println(computer.getDisplay().toString());
        computer.getDisplay().show();
    }


}
